/*****************************************************************************
*
*  PROJECT:     SlipStream
*               (CSoundManager Class)
*  LICENSE:     GNU General Public License v3 - http://www.gnu.org/licenses/gpl.html

*  DEVELOPERS:  Philip Farquharson 	<B00137077@studentmail.uws.ac.uk>
*				John Gray 			<B00145524@studentmail.uws.ac.uk>		
*				Zohaib Bhatti		<B00104280@studentmail.uws.ac.uk>
*				Euan Hislop 		<B00138636@studentmail.uws.ac.uk>
*
*****************************************************************************/
#ifndef CSOUNDMANAGER_H
#define CSOUNDMANAGER_H

#include <stdio.h>
#include <list>
#include "irrKlang/irrKlang.h"
#include <conio.h>
#include "CSingleton.h"
#include "CSound2D.h"
#include "CSound3D.h"

using namespace std;
using namespace irrklang;

class CSoundManager : public CSingleton < CSoundManager >
{
	private:
		ISoundEngine* m_pEngine;
		std::list<CSound2D*> sound2ds;
		std::list<CSound3D*> sound3ds;

	public:
		CSoundManager ( );
		~CSoundManager ( void );

		CSound2D* createSound ( const char* szFilename, bool bPlay, bool bLoop, float fVolume );
		CSound3D* createSound ( const char* szFilename, bool bPlay, bool bLoop, float fVolume, CVector3 vecPosition, float fMinDistance, float fMaxDistance );

		void destroySound ( CSound2D* pSound );
		void destroySound ( CSound3D* pSound );

		void updateCameraPosition ( CVector3 vecPosition, CVector3 vecLookAt, CVector3 vecVelocity );
};
#endif